package GUI;

import java.awt.event.ActionListener;

import javax.swing.JButton;
import Controllers.LoginController;
import java.awt.Color;

/**
 * The Class ManageLivArTabGUI extends AbstractGUI class.
 * The user uses this class in order to add  living area
 * @author Semion
 */
public class ManageLivArTabGUI extends AbstractPanelGUI {
	/** The Add button. */
	private JButton btnAdd;
	/** The back button. */
	private JButton btnBack;
	/**
	 * Create the panel ManageLivArTabGUI.
	 */
	public ManageLivArTabGUI() {
		LoginController.mainWindow.setTitle("Manage living area table");
		setBackground(Color.ORANGE);
		initialize();
	}

	/* (non-Javadoc)
	 * @see GUI.AbstractPanelGUI#initialize()
	 */
	@Override
	public void initialize() {
		setLayout(null);
		setSize(Width,Height);
		
		
		btnAdd = new JButton("Add living area");
		btnAdd.setBounds(174, 153, 168, 44);
		add(btnAdd);
		
		btnBack = new JButton("Back");
		btnBack.setBounds(10, 337, 89, 23);
		add(btnBack);
		
		
	}
	/**
	 * Adds  action listener to Add button.
	 *
	 * @param listener the listener
	 */
	public void addAddActionListener(ActionListener listener)
	{
		btnAdd.addActionListener(listener);
	}
	

	/**
	 * Adds action listener to the back button.
	 *
	 * @param listener the listener
	 */
	public void addBackActionListener(ActionListener listener)
	{
		btnBack.addActionListener(listener);
	}
}